//
//  TempViewController.swift
//  SinaWeibo
//
//  Created by apple on 15/11/15.
//  Copyright © 2015年 apple. All rights reserved.
//

import UIKit

class TempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
//        self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "返回", style: .Plain, target: self, action: "back")
        self.title = "\(navigationController?.childViewControllers.count)耶"
       view.backgroundColor = UIColor.randomColor()
    }

    
    override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
        let temp = TempViewController()
        navigationController?.pushViewController(temp, animated: true)
    }
    
    @objc private func back() {
        navigationController?.popViewControllerAnimated(true)
    }

}
